<?php

namespace app\api\controller\admin;

use app\common\controller\Api;
use app\api\service\admin\AppointmentService;

class Appointment extends Api
{
    protected $noNeedLogin = ['export'];
    protected $noNeedRight = [];
    

    

    /**
     * 查看
     */
    public function index()
    {
        $data = $this->request->post();
        $res = AppointmentService::index($data);
        return json($res);
    }

    /**
     * 添加
     */
    public function add()
    {
        $data = $this->request->post();
        $res = AppointmentService::add($data);
        return json($res);
    }

    /**
     * 编辑
     */
    public function edit()
    {
        $data = $this->request->post();
        $res = AppointmentService::edit($data);
        return json($res);
    }

    /**
     * 支付
     */
    public function payment()
    {
        $data = $this->request->post();
        $res = AppointmentService::payment($data);
        return json($res);
    }

    /**
     * 记录
     */
    public function record()
    {
        $data = $this->request->post();
        $res = AppointmentService::record($data);
        return json($res);
    }

    /**
     * 详情
     */
    public function view()
    {
        $data = $this->request->post();
        $res = AppointmentService::view($data);
        return json($res);
    }

    /**
 * 新增跟进
 */
    public function add_follow_up()
    {
        $data = $this->request->post();
        $res = AppointmentService::add_follow_up($data);
        return json($res);
    }

    /**
     * 跟进记录
     */
    public function list_follow_up()
    {
        $data = $this->request->post();
        $res = AppointmentService::list_follow_up($data);
        return json($res);
    }

    /**
     * 跟进export
     */
    public function follow_up_export()
    {
        $data = $this->request->post();
        $res = AppointmentService::follow_up_export($data);
        return json($res);
    }
    
}